<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1"><title id="ea20941">RELEASE SAVEPOINT</title><body><p id="sql_command_desc">Destroys a previously defined savepoint.</p><section id="section2"><title>Synopsis</title><codeblock id="sql_command_synopsis">RELEASE [SAVEPOINT] <varname>savepoint_name</varname></codeblock></section><section id="section3"><title>Description</title><p><codeph>RELEASE SAVEPOINT</codeph> destroys a savepoint previously defined
in the current transaction. </p><p>Destroying a savepoint makes it unavailable as a rollback point, but it has no other user visible
        behavior. It does not undo the effects of commands run after the savepoint was
        established. (To do that, see <codeph><xref href="./ROLLBACK_TO_SAVEPOINT.xml#topic1"
            type="topic" format="dita"/></codeph>.) Destroying a savepoint when it is no longer
        needed may allow the system to reclaim some resources earlier than transaction end. </p><p><codeph>RELEASE SAVEPOINT</codeph> also destroys all savepoints that were established
          <i>after</i> the named savepoint was established.</p></section><section id="section4"><title>Parameters</title><parml><plentry><pt><varname>savepoint_name</varname></pt><pd>The name of the savepoint to destroy.</pd></plentry></parml></section><section id="section5"><title>Examples</title><p>To establish and later destroy a savepoint:</p><codeblock>BEGIN;
    INSERT INTO table1 VALUES (3);
    SAVEPOINT my_savepoint;
    INSERT INTO table1 VALUES (4);
    RELEASE SAVEPOINT my_savepoint;
COMMIT;</codeblock><p>The above transaction will insert both 3 and 4. </p></section><section id="section6"><title>Compatibility</title><p>This command conforms to the SQL standard. The standard specifies that
the key word <codeph>SAVEPOINT</codeph> is mandatory, but Greenplum Database
allows it to be omitted. </p></section><section id="section7"><title>See Also</title><p><codeph><xref href="BEGIN.xml#topic1" type="topic" format="dita"/></codeph>, <codeph><xref
            href="./SAVEPOINT.xml#topic1" type="topic" format="dita"/></codeph>, <codeph><xref
            href="./ROLLBACK_TO_SAVEPOINT.xml#topic1" type="topic" format="dita"/></codeph>,
            <codeph><xref href="COMMIT.xml#topic1" type="topic" format="dita"/></codeph></p></section></body></topic>
